| Author | Manuela Ruiz (mruiz@lcc.uma.es) |
A sort of goal: satisfied when there are no labels in the current shape
| returns | true iff the current shape has no labels |
# File lib/goals.rb, line 39
39: def satisfied?
40: satisfied = true
41:
42: j = 0
43: n_layers = Sketchup.active_model.layers.length
44: layer_name = "Layer0"
45: while (satisfied and (j < n_layers))
46: layer_name = Sketchup.active_model.layers[j].name
47:
48: labels = Shade.project.execution.current_shape.p[layer_name]
49:
50: if (labels.size == 1) and (labels.first.key.value == Constants::INTERSECTION_LABEL)
51: satisfied = false
52: elsif (labels.size > 1)
53: satisfied = false
54: end
55:
56: j+=1
57: end
58:
59: return satisfied
60: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.